/*
 * @lc app=leetcode.cn id=705 lang=cpp
 *
 * [705] 设计哈希集合
 */

// @lc code=start
class MyHashSet {
    vector<int> v;
public:
    MyHashSet() {

    }
    
    void add(int key) {
        if (find(v.begin(), v.end(), key) == v.end())
            v.push_back(key);
    }
    
    void remove(int key) {
        auto it = find(v.begin(), v.end(), key);
        if (it != v.end())
            v.erase(it);
    }
    
    bool contains(int key) {
        return find(v.begin(), v.end(), key) != v.end();
    }
};

/**
 * Your MyHashSet object will be instantiated and called as such:
 * MyHashSet* obj = new MyHashSet();
 * obj->add(key);
 * obj->remove(key);
 * bool param_3 = obj->contains(key);
 */
// @lc code=end

